/**
 * @Author: 焦质晔
 * @Date: 2019/6/20
 * @Last Modified by: max.jianhua
 * @Last Modified time: 2020-11-20 15:21:28
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 折扣策略查询(OEM)


// 列表查询	 /tmFiDiscountPolicy/listRecord	POST
export const queryList = (params) => axios.post(`${SERVER.WHOLESALES}/tmFiDiscountPolicy/listRecord`, params)

// 详情  /tmFiDiscountPolicy/getDetail?id=1	GET
export const getDetail = (Id) => axios.get(`${SERVER.WHOLESALES}/tmFiDiscountPolicy/getDetail?id=${Id}`)

// 经销商查询	 /tmFiDiscountPolicy/listDealer?id=1	GET
export const queryListDealer = (Id) => axios.get(`${SERVER.WHOLESALES}/tmFiDiscountPolicy/listDealer?id=${Id}`)

// 选装查询	 /tmFiDiscountPolicy/listOption?id=1	GET
export const queryListOption = (Id) => axios.get(`${SERVER.WHOLESALES}/tmFiDiscountPolicy/listOption?id=${Id}`)

// 折扣规则查询	 /tmFiDiscountPolicy/listRule?id=1	GET
export const queryListRule = (Id) => axios.get(`${SERVER.WHOLESALES}/tmFiDiscountPolicy/listRule?id=${Id}`)

// 导出	 /tmFiDiscountPolicy/export	POST
export const exportExcel = (params) => axios.post(`${SERVER.WHOLESALES}/tmFiDiscountPolicy/export`, params, {
  responseType: 'blob'
})

// 结算方式 /fiAccountType?fundsType=0&powerType=60081001
export const getFiAccountType = (params) => axios.post(`${SERVER.WHOLESALES}/tmFiAccountType/list`, params)


// 订单细分查询  /fiOrderTypeSub/searchFiOrderTypeSubDTOList
export const queryOrderTypeSub = (params) => axios.get(`${SERVER.WHOLESALES}/fiOrderTypeSub/searchFiOrderTypeSubDTOListNotPage`, {
  params
})

// / 导出
export const exporturl = params => axios.post(`/api/cmscloud.excel/downloadExcel/exportExcel/${params.CODE}`, params);
